/*
 * @Description: 设备api接口
 * @Version: 1.0
 * @Author: Symbol_Yang
 * @Date: 2022-06-07 11:06:23
 * @LastEditors: Symbol_Yang
 * @LastEditTime: 2023-03-20 09:45:22
 */
const Router = require('koa-router')

const equipmentController = require('../../controllers/equipment')

const m = require('../../middlewares/admin_auth')

const router = new Router({ prefix: '/admin/api/v1/equipment' })


router.get('/getList', m.auth,equipmentController.list);

router.get('/unRelation', m.auth,equipmentController.getUnRelationData);

router.get("/clear/cache", m.auth, equipmentController.clearEquCacheData)

router.post('/create', m.auth,equipmentController.create)


router.get('/detail/:id',m.auth, equipmentController.detail)


router.delete('/:id', m.auth, equipmentController.delete)


router.patch('/:id', m.auth, equipmentController.update)

router.get("/byCabId", m.auth, equipmentController.getEquDataByCabId)

router.get('/dict/equType', m.auth,equipmentController.getEquipmentTypeList);

router.get('/dict/equStatus', m.auth,equipmentController.getMachineStatusList);

router.get("/dict/gasType", m.auth, equipmentController.getEquGasTypeMap);

module.exports = router
